Please note that JavaScript is currently only available in Netscape Navigator 2.0 or higher.
Do not assume that all in your audience are using a JavaScript enabled browser.
The script is named GetRandomURL and it is placed in the HEAD section of the HTML document. The script is executed by clicking on a link containing a call to GetRandomURL(). Also note the custom text in Netscape's status area.
Example of this script picking a random page.
Internet Explorer Warning!
Internet Explorer support for JavaScript (called JScript, for obvious reasons) is not as complete as Netscape's implementation, so the script above will give an error message in version 3.0 of MS Internet Explorer for Windows. The 3.0 beta 1 version of Internet Explorer for MacOS doesn't seem to support JScript at all.
Below is an example of a dynamic script that gives better compatibility with Internet Explorer. It works like the above in Netscape Navigator, but without any custom text in the status area, and gives an ordinary link in Explorer:
How to use:
Replace the filenames inside the script with your own URLs and edit this page contents inside the <BODY> section. (You can also copy the entire script to an existing page).
Use code similar to this to let the user execute the script:
The following script is the dynamic script that can be used to insert appropriate code for Navigator and Explorer. Change the link "zeppo.html" in the code below to the page you want to be used with Explorer.